package com.situ.mall.pattern.observer2;

import java.util.Observable;

public class NewsPaper extends Observable {
    private String content;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
        //使用JDK的观察者模式，这句话一定要加上
        setChanged();
        //notifyObservers();
        notifyObservers(content);
    }
}
